import request from '@/utils/request'

// 查询点位字典列表
export function listDict(query) {
    return request({
        url: '/system/tagNameDict/list',
        method: 'get',
        params: query
    })
}

// 查询点位字典详细
export function getDict(tagName) {
    return request({
        url: '/system/tagNameDict/' + tagName,
        method: 'get'
    })
}

// 新增点位字典
export function addDict(data) {
    return request({
        url: '/system/tagNameDict',
        method: 'post',
        data: data
    })
}

// 修改点位字典
export function updateDict(data) {
    return request({
        url: '/system/tagNameDict',
        method: 'put',
        data: data
    })
}

// 删除点位字典
export function delDict(tagName) {
    return request({
        url: '/system/tagNameDict/' + tagName,
        method: 'delete'
    })
}
